from ultralytics import YOLO


model = YOLO("./yolov8n.pt")
predictions = model.predict(source="./demo.jpg")

model.save('./demo-predictions.jpg', predictions)


print("==================== 推理结果 =====================")
i=0
for result in predictions:
    print("==================== 【"+str(i)+"】 =====================")
    print(result.boxes)
